#pragma once

class CBinary
{
public:
	CBinary(void);
	~CBinary(void);

	IplImage *			BinaryImage(IplImage *pImage,const int &nBinType,const float &nThrd );
private:
	IplImage *			adaptive_local_threshold(IplImage *pImage);
	IplImage *			adapt_global_threshold(IplImage *pImage);
	IplImage *			global_thrd(IplImage *pImage,const float &nThrd = 80.0);

	void				histon(IplImage *pImage);
	void				histon_equilibrium();
	void				binary(float threshold,IplImage *pImage);
	unsigned int 		m_nHist[HIST_SIZE];
};
